package cn.imvc.app.components;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
import org.springframework.web.context.ServletContextAware;

import cn.imvc.app.commons.SystemConfig;
@Component
public class InitializingData implements InitializingBean,ServletContextAware {
	

	@Autowired
	HttpServletRequest httpServletRequest;
	@Autowired
	SystemConfig systemConfig;
	

	@Override
	public void afterPropertiesSet() throws Exception {
		
	}


	@Override
	public void setServletContext(ServletContext servletContext) {
		servletContext.setAttribute("staticPath", systemConfig.getStaticFileDomain());
		
	}


}
